/**
 * 
 */
package edu.umd.clip.lm.model.training;

import org.w3c.dom.*;

import edu.umd.clip.lm.model.data.AbstractTrainingData;
import edu.umd.clip.lm.questions.*;
import edu.umd.clip.lm.util.*;
/**
 * @author Denis Filimonov <den@cs.umd.edu>
 *
 */
public class TrainingHistoryTreePayload extends XMLizable {
	public static final String XML_ELEMENT_NAME = "history-tree-payload";
	public static final String XML_CLUSTERID_ATTR_NAME = "cluster-id";
	public AbstractTrainingData trainData;
	public AbstractTrainingData devData;
	public Question question;
	public float cost;
	public float devCost;
	public double lambda;
	public Long2DoubleMap distribution;
	
	/**
	 * @param trainData
	 * @param devData
	 * @param question
	 */
	public TrainingHistoryTreePayload(AbstractTrainingData trainData,
			AbstractTrainingData devData, Question question) {
		this.trainData = trainData;
		this.devData = devData;
		this.question = question;
		this.cost = Float.POSITIVE_INFINITY;
		this.devCost = Float.POSITIVE_INFINITY;
	}

	public TrainingHistoryTreePayload(AbstractTrainingData trainData,
			AbstractTrainingData devData) {
		this(trainData, devData, null);
	}
	
	/**
	 * @param xmlnode
	 */
	public TrainingHistoryTreePayload(Element xmlnode) {
		// not meant to be ever finished from XML
		assert(false);
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.util.XMLizable#createXML(org.w3c.dom.Document)
	 */
	@Override
	public Element createXML(Document doc) {
		// not meant to be ever xmlized
		assert(false);
		return null;
	}
	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.util.XMLizable#getElementName()
	 */
	@Override
	public String getElementName() {
		return XML_ELEMENT_NAME;
	}
	
}
